﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using FCNS.Utility;

namespace FCNS.KeepMoney.Configuration
{
    public sealed class AppDefines
    {
        public static string exchangeDay = string.Empty;
        public static string appPath = AppDomain.CurrentDomain.BaseDirectory;
        public static string gtdBackgroupImage = UrlUtil.ConvertSeparators(appPath + "Resources\\gtd.png");
        public static string billDirectory = UrlUtil.ConvertSeparators(appPath + "BillStyle\\");
        public static string msgVoice = UrlUtil.ConvertSeparators(appPath + "voice\\newmsg.mp3");
        public static string languagePath = UrlUtil.ConvertSeparators(appPath + "language\\");
        public static string stylePath = UrlUtil.ConvertSeparators(appPath + "PrintStyle\\");
        //私房钱
        public const string defaultLanguage = "简体中文";
        public const string kmoneyInstructions = "KeepMoney 简单、开源、免费的个人账务管理软件";
        public const string kmdFilter = "KMoney数据(*.kmd)|*.kmd";
        /// <summary>
        /// 数据库版本.程序版本.平台识别号(0_all:1_win:2_linux:3_mac).修正号
        /// </summary>
        public const string version = "5.1.0.121022";
        /// <summary>
        /// 完整程序名称
        /// </summary>
        public const string fullName = "KeepMoney";
        /// <summary>
        /// 程序简称
        /// </summary>
        public const string shortName = "KMoney";
        public const string fileExt = "kmd";
        public const string extId = "KeepMoneyFile";
        /// <summary>
        /// yyyyMMdd
        /// </summary>
        public const string dateFormat_yyyyMMdd = "yyyyMMdd";
        /// <summary>
        /// yyyy-MM
        /// </summary>
        public const string dateFormat_yyyy_MM = "yyyy-MM";
        /// <summary>
        /// yyyy-MM-dd
        /// </summary>
        public const string dateFormat_yyyy_MM_dd = "yyyy-MM-dd";
        /// <summary>
        /// 插件验证名称
        /// </summary>
        public const string PluginProductName = "PluginForKeepMoney";
        /// <summary>
        /// 控件编辑错误状态下的颜色
        /// </summary>
        public static readonly Color ColorEditError = Color.FromArgb(255, 192, 192);
        /// <summary>
        /// 获取数据库凭证的加密次数(默认6000)
        /// </summary>
        public const ulong DefaultKeyEncryptionRounds = 6000;
        /// <summary>
        /// 新建账务记录的热键Id
        /// </summary>
        public const int hotkeyNewEntry = 1382408;
        /// <summary>
        /// 显示主窗体的热键Id
        /// </summary>
        public const int hotkeyShowMainForm = 1382409;
        /// <summary>
        /// 主窗体的位置与大小的初始化值
        /// </summary>
        public const int InvalidWindowValue = 500;
        public const string webSite = "http://www.keepmoney.org";
        public const string Acknowledgements = "http://www.keepmoney.org";
        /// <summary>
        /// KeepMoney 说明文件
        /// </summary>
        public const string declare = "http://www.keepmoney.org/help/feature.html";
        /// <summary>
        /// 程序的版本文件
        /// </summary>
        public const string VersionUrl = "http://www.keepmoney.org/download/version.xml";
        public const string UpdateUrl = "http://www.keepmoney.org/download/version.xml";
        public const string AdsenseUrl = "http://www.keepmoney.org/download/adsense.xml";

        public sealed class WebSite
        {
            public static void Show(string tag)
            {
                System.Diagnostics.Process.Start("http://www.keepmoney.org/" + tag);
            }

            public const string DonationsUrl = "donate.html";
            public const string pluginUrl = "plugin.html";
            public const string languageUrl = "language.html";
            public const string downloadUrl = "download.html";

        }

        public sealed class HelpTopic
        {
            public static void Show(string tag)
            {
                System.Diagnostics.Process.Start("http://www.keepmoney.org/help/use/" + tag);
            }

            public const string NoFormat = "KMDataFormat.html#NoFormat";
            public const string KMinWeb = "KMinWeb.html";
        }
    }
}